package com.mlz.www.operator;

//算数运算符
public class Demo01 {
    public static void main(String[] args) {
        int a = 10;
        int b = 2;
        System.out.println(a + b);
        System.out.println(a - b);
        System.out.println(a * b);
        System.out.println(a / b);
        System.out.println(5 / 2); //2.5 => 2
        System.out.println(5.0 / 2);//2.5

        int i = 5;
        int j = 2;
        System.out.println(1.0 * i / j);//2.5

        System.out.println( a % b);//0
        System.out.println(3 / 2);//1


        //使用+符号做连接符使用 -> 和字符串在一起的时候
        int a2 = 5;
        System.out.println("abc" + a2);//abc5
    }
}
